3.831 \(\int \frac {\sin (c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=85 \[ -\frac {2 \tan ^7(c+d x)}{7 a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec (c+d x)}{a^2 d} \]

[Out]

-sec(d*x+c)/a^2/d+4/3*sec(d*x+c)^3/a^2/d-sec(d*x+c)^5/a^2/d+2/7*sec(d*x+c)^7/a^2/d-2/7*tan(d*x+c)^7/a^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2875, 2873, 2606, 270, 2607, 30, 194} \[ -\frac {2 \tan ^7(c+d x)}{7 a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec (c+d x)}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[(Sin[c + d*x]*Tan[c + d*x]^4)/(a + a*Sin[c + d*x])^2,x]

[Out]

-(Sec[c + d*x]/(a^2*d)) + (4*Sec[c + d*x]^3)/(3*a^2*d) - Sec[c + d*x]^5/(a^2*d) + (2*Sec[c + d*x]^7)/(7*a^2*d)
 - (2*Tan[c + d*x]^7)/(7*a^2*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2875

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[((g*Cos[e + f*x])^(2*m + p)*(d*Sin[e + f*x])^n)/(a - b*Sin[e +
 f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {\sin (c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \sec ^3(c+d x) (a-a \sin (c+d x))^2 \tan ^5(c+d x) \, dx}{a^4}\\ &=\frac {\int \left (a^2 \sec ^3(c+d x) \tan ^5(c+d x)-2 a^2 \sec ^2(c+d x) \tan ^6(c+d x)+a^2 \sec (c+d x) \tan ^7(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \sec ^3(c+d x) \tan ^5(c+d x) \, dx}{a^2}+\frac {\int \sec (c+d x) \tan ^7(c+d x) \, dx}{a^2}-\frac {2 \int \sec ^2(c+d x) \tan ^6(c+d x) \, dx}{a^2}\\ &=\frac {\operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\operatorname {Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^2 d}-\frac {2 \operatorname {Subst}\left (\int x^6 \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac {2 \tan ^7(c+d x)}{7 a^2 d}+\frac {\operatorname {Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}+\frac {\operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {\sec (c+d x)}{a^2 d}+\frac {4 \sec ^3(c+d x)}{3 a^2 d}-\frac {\sec ^5(c+d x)}{a^2 d}+\frac {2 \sec ^7(c+d x)}{7 a^2 d}-\frac {2 \tan ^7(c+d x)}{7 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.26, size = 126, normalized size = 1.48 \[ -\frac {\sec ^3(c+d x) (28 \sin (c+d x)-104 \sin (2 (c+d x))+66 \sin (3 (c+d x))-52 \sin (4 (c+d x))+6 \sin (5 (c+d x))-182 \cos (c+d x)+104 \cos (2 (c+d x))-39 \cos (3 (c+d x))-18 \cos (4 (c+d x))+13 \cos (5 (c+d x))+42)}{336 a^2 d (\sin (c+d x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sin[c + d*x]*Tan[c + d*x]^4)/(a + a*Sin[c + d*x])^2,x]

[Out]

-1/336*(Sec[c + d*x]^3*(42 - 182*Cos[c + d*x] + 104*Cos[2*(c + d*x)] - 39*Cos[3*(c + d*x)] - 18*Cos[4*(c + d*x
)] + 13*Cos[5*(c + d*x)] + 28*Sin[c + d*x] - 104*Sin[2*(c + d*x)] + 66*Sin[3*(c + d*x)] - 52*Sin[4*(c + d*x)]
+ 6*Sin[5*(c + d*x)]))/(a^2*d*(1 + Sin[c + d*x])^2)

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 104, normalized size = 1.22 \[ -\frac {9 \, \cos \left (d x + c\right )^{4} - 22 \, \cos \left (d x + c\right )^{2} - 2 \, {\left (3 \, \cos \left (d x + c\right )^{4} + 6 \, \cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) + 5}{21 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )^{3}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/21*(9*cos(d*x + c)^4 - 22*cos(d*x + c)^2 - 2*(3*cos(d*x + c)^4 + 6*cos(d*x + c)^2 - 1)*sin(d*x + c) + 5)/(a
^2*d*cos(d*x + c)^5 - 2*a^2*d*cos(d*x + c)^3*sin(d*x + c) - 2*a^2*d*cos(d*x + c)^3)

________________________________________________________________________________________

giac [A]  time = 0.30, size = 146, normalized size = 1.72 \[ \frac {\frac {7 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {42 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 315 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1015 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1750 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1344 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 511 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 79}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{168 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/168*(7*(6*tan(1/2*d*x + 1/2*c)^2 - 15*tan(1/2*d*x + 1/2*c) + 7)/(a^2*(tan(1/2*d*x + 1/2*c) - 1)^3) - (42*tan
(1/2*d*x + 1/2*c)^6 + 315*tan(1/2*d*x + 1/2*c)^5 + 1015*tan(1/2*d*x + 1/2*c)^4 + 1750*tan(1/2*d*x + 1/2*c)^3 +
 1344*tan(1/2*d*x + 1/2*c)^2 + 511*tan(1/2*d*x + 1/2*c) + 79)/(a^2*(tan(1/2*d*x + 1/2*c) + 1)^7))/d

________________________________________________________________________________________

maple [A]  time = 0.56, size = 145, normalized size = 1.71 \[ \frac {-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {64}{256 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-256}+\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {5}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{a^{2} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*sin(d*x+c)^5/(a+a*sin(d*x+c))^2,x)

[Out]

64/d/a^2*(-1/768/(tan(1/2*d*x+1/2*c)-1)^3-1/512/(tan(1/2*d*x+1/2*c)-1)^2+1/256/(tan(1/2*d*x+1/2*c)-1)+1/112/(t
an(1/2*d*x+1/2*c)+1)^7-1/32/(tan(1/2*d*x+1/2*c)+1)^6+1/32/(tan(1/2*d*x+1/2*c)+1)^5-5/768/(tan(1/2*d*x+1/2*c)+1
)^3-3/512/(tan(1/2*d*x+1/2*c)+1)^2-1/256/(tan(1/2*d*x+1/2*c)+1))

________________________________________________________________________________________

maxima [B]  time = 0.34, size = 296, normalized size = 3.48 \[ -\frac {16 \, {\left (\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + 1\right )}}{21 \, {\left (a^{2} + \frac {4 \, a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {8 \, a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {14 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {8 \, a^{2} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^5/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-16/21*(4*sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 8*sin(d*x + c)^3/(cos(d*x
+ c) + 1)^3 - 14*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 1)/((a^2 + 4*a^2*sin(d*x + c)/(cos(d*x + c) + 1) + 3*a^
2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 8*a^2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 14*a^2*sin(d*x + c)^4/(cos
(d*x + c) + 1)^4 + 14*a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 8*a^2*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 3*
a^2*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 4*a^2*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - a^2*sin(d*x + c)^10/(cos
(d*x + c) + 1)^10)*d)

________________________________________________________________________________________

mupad [B]  time = 12.37, size = 160, normalized size = 1.88 \[ -\frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{21}+\frac {64\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{7}-\frac {128\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{21}-\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}}{a^2\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)^5/(cos(c + d*x)^4*(a + a*sin(c + d*x))^2),x)

[Out]

-((16*cos(c/2 + (d*x)/2)^10)/21 + (64*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2))/21 - (32*cos(c/2 + (d*x)/2)^6*s
in(c/2 + (d*x)/2)^4)/3 - (128*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^3)/21 + (16*cos(c/2 + (d*x)/2)^8*sin(c/2
 + (d*x)/2)^2)/7)/(a^2*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^3*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))
^7)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*sin(d*x+c)**5/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________